scl = 10
x = scl
x1 = scl
y = scl*10
y1 = scl*10
xp = scl*2
from Tkinter import*
root = Tk()
can = Canvas(root,width = 740,height = 720)
can.pack()
fl = True
i = 0
while i < 5:
	can.create_line(x,y,x1*73,y1)
	y = y + scl
	y1 = y1 + scl
	i = i + 1
def line():
	global x,x1,y,y1
	can.create_line(x,y,x1,y1)
def oval():
	global x,x1,y,y1
	if fl == True:
		bl = "black"
		can.create_oval(x,y,x1,y1,fill = bl)
	else:
		can.create_oval(x,y,x1,y1)
song = ["r","Ac","e2","dc","|","e3","d","d4","|",
		"r","Bc","d2","Bc","|","A8","|",
		]
for el in song:
	if el == "r":
		x = xp
		x1 = xp
		y = scl*11
		y1 = scl*13
		line()
		xp = xp + scl * 3
	elif el == "A8":
		x = xp
		x1 = xp-scl
		y = scl*12
		y1 = scl*13
		fl = False
		oval()
		xp = xp + scl*6
	elif el == "Ac":
		x = xp
		x1 = xp
		y = scl*8
		y1 = scl*12
		line()
		x = xp
		x1 = xp-scl
		y = scl*12
		y1 = scl*13
		line()
		xp = xp + scl * 3
		x = xp
		x1 = xp
		y = scl*7
		y1 = scl*11
		line()
		x = xp
		x1 = xp-scl
		y = scl*11
		y1 = scl*12
		line()
		x = xp-scl*3
		x1 = xp
		y = scl*8
		y1 = scl*7
		line()
		xp = xp + scl*4
	elif el == "e2":
		x = xp
		x1 = xp
		y = scl*6
		y1 = scl*10
		line()
		x = xp
		x1 = xp-scl
		y = scl*10
		y1 = scl*11
		line()
		xp = xp + scl*4
	elif el == "e3":
		x = xp
		x1 = xp
		y = scl*6
		y1 = scl*10
		line()
		x = xp
		x1 = xp-scl
		y = scl*10
		y1 = scl*11
		line()
		x = xp+scl
		x1 = xp+scl/1.5
		y = scl*10.3
		y1 = scl*10.6
		fl = True
		oval()
		xp = xp + scl*4.5
	elif el == "dc":
		x = xp
		x1 = xp
		y = scl*6.5
		y1 = scl*10.5
		line()
		x = xp
		x1 = xp-scl
		y = scl*10.5
		y1 = scl*11.5
		line()
		xp = xp + scl * 3
		x = xp
		x1 = xp
		y = scl*7
		y1 = scl*11
		line()
		x = xp
		x1 = xp-scl
		y = scl*11
		y1 = scl*12
		line()
		x = xp-scl*3
		x1 = xp
		y = scl*6.5
		y1 = scl*7
		line()
		xp = xp + scl*3
	elif el == "|":
		x = xp
		x1 = xp
		y = scl*10
		y1 = scl*14
		line()
		xp = xp + scl*3
	elif el == "d":
		x = xp
		x1 = xp
		y = scl*6.5
		y1 = scl*10.5
		line()
		x = xp
		x1 = xp-scl
		y = scl*10.5
		y1 = scl*11.5
		line()
		x = xp
		x1 = xp+scl
		y = scl*6.5
		y1 = scl*8
		line()
		xp = xp + scl*4
	elif el == "d2":
		x = xp
		x1 = xp
		y = scl*6.5
		y1 = scl*10.5
		line()
		x = xp
		x1 = xp-scl
		y = scl*10.5
		y1 = scl*11.5
		line()
		xp = xp + scl*4
	elif el == "d4":
		x = xp
		x1 = xp
		y = scl*6.5
		y1 = scl*10.5
		line()
		x = xp
		x1 = xp-scl
		y = scl*10.5
		y1 = scl*11.5
		fl = False
		oval()
		x = xp+scl
		x1 = xp+scl/1.5
		y = scl*10.3
		y1 = scl*10.6
		fl = True
		oval()
		xp = xp + scl*4
	elif el == "Bc":
		x = xp
		x1 = xp
		y = scl*7.5
		y1 = scl*11.5
		line()
		x = xp
		x1 = xp-scl
		y = scl*11.5
		y1 = scl*12.5
		line()
		xp = xp + scl * 3
		x = xp
		x1 = xp
		y = scl*7
		y1 = scl*11
		line()
		x = xp
		x1 = xp-scl
		y = scl*11
		y1 = scl*12
		line()
		x = xp-scl*3
		x1 = xp
		y = scl*7.5
		y1 = scl*7
		line()
		xp = xp + scl*4
root.mainloop()
